<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //思路：cage=10,cag2=20。先设置一个空变量temp，把cage1的值给temp，然后把cage2的值给cage1
        //再把temp的值给cage2.空变量不使用后会自动销毁。
        let cage1=10;
        let cage2=20;
        let temp=cage1
        cage1=cage2
        cage2=temp
        document.write(cage1,",",cage2)
    </script>
</body>
</html>